<template>
<div>
        <h4>组件分包异步加载-----suspense使用</h4>
        <Suspense>
                <template #default>
                        <Dialog/>
                </template>
                <template #fallback>
                        <div>loading....</div>
                </template>
        </Suspense>
</div>
</template>
    
<script setup lang='ts'>
import { defineAsyncComponent } from "@vue/runtime-core";
import { ref } from "vue";
const Dialog = defineAsyncComponent(() => import('../components/async.vue'));
</script>
    
<style>
    
</style>